<?php
namespace BP\GPM;
require_once("BP/En/Map.php");
class DeptEmp extends EntityMyPK {
	public function getHisUAC () 
	{
		$uac = new UAC();
		$uac->OpenForSysAdmin();
		return $uac;
	}
	public function getFK_Emp () 
	{
		return $this->GetValStringByKey(DeptEmpAttr::$FK_Emp);
	}
	public function setFK_Emp ($value) // [String value]
	{
		$this->SetValByKey(DeptEmpAttr::$FK_Emp, $value);
		$this->setMyPK((($this->getFK_Dept() . "_") . $this->getFK_Emp()));
	}
	public function getFK_Dept () 
	{
		return $this->GetValStringByKey(DeptEmpAttr::$FK_Dept);
	}
	public function setFK_Dept ($value) // [String value]
	{
		$this->SetValByKey(DeptEmpAttr::$FK_Dept, $value);
		$this->setMyPK((($this->getFK_Dept() . "_") . $this->getFK_Emp()));
	}
	public static function constructor__ () 
	{
		$me = new self();
		return $me;
	}
	public static function constructor__String_String ($deptNo, $empNo) // [String deptNo, String empNo]
	{
		$me = new self();
		$me->setFK_Dept($deptNo);
		$me->setFK_Emp($empNo);
		$me->setMyPK((($me->getFK_Dept() . "_") . $me->getFK_Emp()));
		$me->Retrieve();
		return $me;
	}
	public function getEnMap () 
	{
		if (($this->get_enMap() != NULL))
		{
			return $this->get_enMap();
		}
		$map = new Map("Port_DeptEmp");
		$map->setEnDesc("部门人员信息");
		$map->IndexField = DeptEmpAttr::$FK_Dept;
		$map->AddMyPK();
		$map->AddTBString(DeptEmpAttr::$FK_Dept, NULL, "部门",  FALSE ,  FALSE , 1, 50, 1);
		$map->AddDDLEntities(DeptEmpAttr::$FK_Emp, NULL, "操作�?", Emps::constructor__(),  FALSE );
		$this->set_enMap($map);
		return $this->get_enMap();
	}
	protected function beforeUpdateInsertAction () 
	{
		$this->setMyPK((($this->getFK_Dept() . "_") . $this->getFK_Emp()));
		return parent->beforeUpdateInsertAction();
	}
}
?>
